package com.xique.blelock.NetUtils;

import com.xique.blelock.model.FingerInfo;
import com.xique.blelock.model.HistoryMessageInfo;
import com.xique.blelock.model.LockAllinfo;
import com.xique.blelock.model.LockInfo;
import com.xique.blelock.model.Operationinfo;
import com.xique.blelock.model.UnreadMessage;
import com.xique.blelock.model.UserNetInfo;
import com.xique.blelock.model.UserOfLockinfo;

import org.json.JSONObject;

import java.util.List;

import butterknife.OnClick;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2018/10/15.
 */

public interface XqNetService {

    public static final String URL_SERVICE = "http://22399q1s44.iok.la:35710/";
//public static final String URL_SERVICE =  "https://enterpriseapi.gizwits.com/";
    //public static final String URL_SERVICE = "http://www.zhiweijy.com/zwe/api/";
    public static final String URL_IMAGE = "http://www.zhiweijy.com";


    //获取验证码
    public static final String SENDAUTHCODE = "app/sendAuthCode";

    //新版获取验证码
    public static final String SENDAUTHCODE2 = "user/getVCode";
    //注册
    public static final String SENDAUTHCODE3 = "user/regist";
    //登录
    public static final String Login = "user/login";
    //退出登录
    public static final String SENDAUTHCODE5 = "user/logout";
    //4、设置密码
    public static final String setPassword = "user/setPassword";
    //5、修改密码
    public static final String changePassword = "user/changePassword";
    //6、重置密码
    public static final String ReSetpasswd = "user/resetPassword";
    //7、更新 用户信息
    public static final String updateUserInfo = "user/updateUserInfo";
    //8、查询用户信息
    public static final String  queryUserInfo = "user/queryUserInfo";

    //反馈意见
    public static final  String sendSuggestiions = "user/sendSuggestions";

    //发送握手码有效性查询
    public static final String checkDeviceConneCode = "biz/checkDeviceConnCode";


    //获取操作列表
    public static final String  queryLockRecords = "biz/queryLockRecords";

    //添加操作记录
    public static final String addLockRecords = "biz/addLockRecords";

    //按时间段查询锁操作记录
    public static final String  queryLockRecordsByTime = "biz/queryLockRecordsByTime";

    //删除设备
    public static final String deleteLock = "biz/deleteLock";

    //更改设备的名称
    public static final String updateLockaName = "biz/updateLockName";

    //更改设备的名称
    public static final String updateLockInfo = "biz/updateLockInfo";

    //增加设备
    public static final String addLock = "biz/addLock";

    //获取设备列表
    public static final String queryLockList = "biz/queryLockList";

    //查询当前锁和当前用户的信息关系 biz/queryLockInfo
    //查询已绑定的指定锁信息，包括锁的基本信息，还有绑定的用户列表，指纹列表和操作记录（根据查询用户的身份权限返回相应信息）
    public static final String  queryLockInfo = "biz/queryLockInfo";

    //获取指纹列表
    public static final String getFigerList = "biz/queryFpList";

    //添加指纹列表
    public static final String addFingerList = "biz/addLockFpInfo";

    //删除指纹列表
    public static final String deletFingerLisst = "biz/delLockFpInfo";


    //更新指纹列表
    public static final String updateFinger = "biz/updateFpName";

    //获取指纹列表
    public static final String getUserList = "biz/queryBandUserList";

    //通过手机号查询用户
    public static final String getUserByPhone = "user/queryUserInfoByPhone";

    //添加用户到改组下面
    public static final String addBandUser = "biz/addBandUser";

    //删除绑定锁的用户，管理员的权限
    public static final String deleteBandUser = "biz/deleteBandUser";

    //把该用户设置为该所的副管理员
    public static final String setAdmin = "biz/setAsAdmin";

    //取消管理员
    public static final String cancleAdmin = "biz/undoAdmin";

    //读取纬度消息
    public static final String getUnreadMessageCount = "biz/getUnreadMessageCount";

    //获取历史信息
    public static final String getHistoryMessages = "biz/getHistoryMessages";

    //标记为已经读取
    public static final String setMessageIsRead = "biz/setMessageIsRead";

    //删除消息
    public static final String deleteMessages = "biz/deleteMessages";



    @POST(SENDAUTHCODE2)//获取验证码
    Call<String> sendAuthCode(@Body String dat);
    @POST(SENDAUTHCODE3)//注册
    Call<String> sendAuthCode2(@Body String dat);

    @POST(Login)//登录
    Call<String> Login(@Body String dat);

    @POST(SENDAUTHCODE5)//退出登录
    Call<String> sendAuthCode4(@Body String dat);
    @POST(setPassword)//设置密码
    Call<NetResult> setPassword(@Body String dat);
    @POST(changePassword)//修改密码
    Call<String> changePassword(@Body String dat);
    @POST(ReSetpasswd)//重置密码
    Call<String> ReSetpasswd(@Body String dat);
    @POST(updateUserInfo)//设置用户信息
    Call<String> updateUserInfo(@Body String dat);
    @POST(queryUserInfo)//查询用户信息
    Call<String> queryUserInfo(@Body String dat);
    /*@Headers({ "Content-Type: application/json;charset=UTF-8"})
    Observable<BeanContext> sendAuthCode1(@Body RequestBody body);*/
    //Call<String> sendAuthCode(@Body String phone,@Body String timestamp);


    //提建议 sendSuggestiions
    @POST(sendSuggestiions)
    Call<NetResult> sendSuggestiions(@Body String paramEntity);

    //添加设备
    @POST(addLock)
    Call<NetResult> addLock(@Body String paramEntity);

    //更改设备的名称updateLockaName
    @POST(updateLockaName)
    Call<NetResult> updateLockaName(@Body String paramEntity);

    //删除设备
    @POST(deleteLock)
    Call<NetResult> deleteLock(@Body String paramEntity);

    //updateLockInfo 更改属性
    @POST(updateLockInfo)
    Call<NetResult> updateLockInfo(@Body String paramEntity);

    //获取设备列表
    @POST(queryLockList)
    Call<NetResult<List<LockInfo>>> queryLockList(@Body String paramEntity);


    //获取操作列表queryLockRecords
    @POST(queryLockRecords)
    Call<NetResult<List<Operationinfo>>> queryLockRecords(@Body String paramEntity);

    //查询某一个时间段的操作记录 queryLockRecordsByTime
    @POST(queryLockRecordsByTime)
    Call<NetResult<List<Operationinfo>>> queryLockRecordsByTime(@Body String paramEntity);

    //获取指纹列表
    @POST(getFigerList)
    Call<NetResult<List<FingerInfo>>> getFigerList(@Body String paramEntity);

    //检查有效连接密码 checkDeviceConneCode
    @POST(checkDeviceConneCode)
    Call<NetResult<String>> checkDeviceConneCode(@Body String paramEntity);


    //获取指纹列表
    @POST(getUserList)
    Call<NetResult<List<UserOfLockinfo>>> getUserList(@Body String paramEntity);

    //添加指纹列表
    @POST(addFingerList)
    Call<NetResult> addFingerList(@Body String paramEntity);


    //更新指纹
    @POST(updateFinger)
    Call<NetResult> updateFinger(@Body String paramEntity);

    //删除指纹列表
    @POST(deletFingerLisst)
    Call<NetResult> deletFingerLisst(@Body String paramEntity);

    //获取用户信息通过手机号
    @POST(getUserByPhone)
    Call<NetResult<UserNetInfo>> getUserByPhone(@Body String paramEntity);

    //添加用户到该设备下面
    @POST(addBandUser)
    Call<NetResult> addBandUser(@Body String paramEntity);

    //删除用户从该设备下面
    @POST(deleteBandUser)
    Call<NetResult> deleteBandUser(@Body String paramEntity);

    //摄者管理员
    @POST(setAdmin)
    Call<NetResult> setAdmin(@Body String paramEntity);

    //取消管理员
    @POST(cancleAdmin)
    Call<NetResult> cancleAdmin(@Body String paramEntity);

    @POST(queryLockInfo)
    Call<NetResult<LockAllinfo>> queryLockInfo(@Body String paramEntity);

    //添加控制记录
    @POST(addLockRecords)
    Call<NetResult> addLockRecords(@Body String paramEntity);

    //P 获取为度过的信息  getUnreadMessageCount
    @POST(getUnreadMessageCount)
    Call<NetResult<List<UnreadMessage>>> getUnreadMessageCount(@Body String paramEntity);

    //获取历史信息
    @POST(getHistoryMessages)
    Call<NetResult<List<HistoryMessageInfo>>> getHistoryMessages(@Body String paramEntity);

    //设置消息为已经度过
    @POST(setMessageIsRead)
    Call<NetResult> setMessageIsRead(@Body String paramEntity);

    //删除消息
    @POST(deleteMessages)
    Call<NetResult> deleteMessages(@Body String paramEntity);
}
